package com.test.demo.controller;

import com.test.demo.dao.entity.UserInfo;
import com.test.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户测试
 * @author Gao
 * @date 2018/6/13
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private UserService userService;

    @GetMapping(value = "/select")
    public void list() {
        UserInfo userInfo1 = userService.getUserInfoByUserId("1");
        System.out.println("------userInfo1:" + userInfo1);

        UserInfo userInfo2 = userService.getUserInfoByUserId("2");
        System.out.println("------userInfo2:" + userInfo2);
    }
}
